//
//  Bullet.h
//  Project5
//
//  Created by Nguyen Tan Loc on 5/20/13.
//  Copyright (c) 2013 Nguyen Tan Loc. All rights reserved.
//

#import "CCNode.h"
#import "Utility.h"

#define BULLET_SPEED 500

enum BulletState
{
    STATE_ACTIVE,
    STATE_EXPLOSION,
    STATE_IDLE
};

@interface Bullet : CCNode
{
    enum BulletState m_State;
    int     m_Type;
    int     m_Color;
    float   m_Radius;
    float   m_SpeedX;
    float   m_SpeedY;
    CCSprite *m_Sprite;
}

@property (readonly) int   _type;
@property (readonly) float _radius;
@property (readonly) int   _color;
@property (readonly) enum BulletState _state;

-(id) initWithType:(int)t color:(int)c;
-(void) setAngle:(float)a;
-(void) appear;
-(void) fireWithAngle:(float)a;
-(void) randomColor;
-(void) explode;
-(void) setType:(int)t;

@end
